<?php
if( $_GET['type'] == 'topic' )
{
	require_once('../include/connect.inc.php');
	$id    = (int)$_GET['id'];
	$sql   = " SELECT * FROM tb_topic WHERE subject_id ='$id'";
	$query = mysql_query( $sql );
	$output = '';
	while ( $res   = mysql_fetch_assoc( $query ) ){
		$output .= '<option value='.$res['topic_id'].'>'.$res['topic_detail'].'</option>';
	}
	echo $output;
}
?>